import { http } from "@/utils/http";

type Result = {
  message: string;
  data: any;
  code: number;
};

/** 获取http策略 */
export const getPocTactics = (data?: object) => {
  return http.request<Result>("post", "/api/poc/get_pocs_list", { data });
};

/** 创建自定义策略 */
export const create_custom_pocs_group = (data?: object) => {
  return http.request<Result>("post", "/api/poc/create_pocs_group", { data });
};

/** 获取历史自定义poc组 */
export const get_pocs_group = (data?: object) => {
  return http.request<Result>("post", "/api/poc/get_pocs_group", { data });
};
/** 删除特定自定义poc组 */
export const delete_pocs_group = (data?: object) => {
  return http.request<Result>("post", "/api/poc/delete_pocs_group", { data });
};
/** 根据poc_custom_id获取详情 */
export const get_pocs_group_by_custom_id = (data?: object) => {
  return http.request<Result>("post", "/api/poc/get_pocs_group_by_custom_id", {
    data
  });
};

/** 完成配置策略 */
export const add_scan_tactics = (data?: object) => {
  return http.request<Result>("post", "/api/poc/add_scan_tactics", { data });
};

/** 获取扫描策略列表 */
export const get_scan_tactics = (data?: object) => {
  return http.request<Result>("post", "/api/poc/get_scan_tactics", { data });
};

/** 删除扫描策略 */
export const delete_scan_tactics = (data?: object) => {
  return http.request<Result>("post", "/api/poc/delete_scan_tactics", { data });
};
